using ECommerce.Web.ViewModels;

namespace ECommerce.Web.NHibernate.Mappings.ViewMappings
{
    public class BasketViewMap : ViewMap<BasketView>
    {
        public BasketViewMap()
        {
            Id(x => x.Id);
            Map(x => x.ShopperId);
            Map(x => x.SubTotal);

            HasMany(x => x.Items).KeyColumn("BasketId").Fetch.Join();
        }
    }
}